Conversation
evanugarte
reviewed
Jan 29, 2026
4 tasks
9a86a61 to
f0aa1d8
Compare
evanugarte
reviewed
Apr 27, 2026
Collaborator
evanugarte
left a comment
There was a problem hiding this comment.
this pr could probably be way less code, see comment
evanugarte
reviewed
Apr 27, 2026
| const axios = require('axios'); | ||
| const LEETCODE_LED_SIGN_URL = process.env.LEETCODE_LED_SIGN_URL || 'http://localhost:12121'; | ||
|
|
||
| router.get('/', async (req, res) => { |
Collaborator
There was a problem hiding this comment.
i think this file could be even less
like
app.route('/:id')
.get((req, res) => {
const userId = req.params.id; // Access dynamic parameter
})
.post((req, res) => {
const userId = req.params.id;
});you could probably make a single callback, and pass it in to both .get and .post
like
function idk(req, res) {
// ...
}
app.route('/users/:id')
.get(idk)
.post(idk);change :id with :path or something
evanugarte
reviewed
Apr 27, 2026
| } | ||
| }; | ||
|
|
||
| router.get('/', async (req, res) => { |
Collaborator
There was a problem hiding this comment.
do we need this code still, if we have the router.use
does router.use take care of all this stuff now
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR includes a page and API for managing the LeetCode Leaderboard (sign2) from Clark.
Features
config.json, where users can set whether it is enabled or not. In the future, further unit tests should be added to address these conditions.Testing
This feature has been tested on the production server, where all functions work correctly. Ensure that, after merging, the sign2-specific data in
/api/config/config.jsonmatches what is expected to make sign2 reachable from Clark.